package logo.lang;

/**
 * This is a concrete class to represent the command IF.  An IF
 * statement has three sub expressions: the predicate, the consequent
 * and the alternative.  So, we inherit from an ASTNode3 class.  This
 * class provides an example of how you would implement all of your
 * intermediate classes.
 */
public class IRCmdIf extends IRCmd {

	private IRExp exp1;
	private IRCmdSeq exp2, exp3;
	
	public IRCmdIf(IRExp pred, IRCmdSeq con, IRCmdSeq alt) {
		exp1 = pred;
		exp2 = con;
		exp3 = alt;
    }
	
    public IRExp getChild1() {
		return exp1;
	}


	public IRCmdSeq getChild2() {
		return exp2;
	}


	public IRCmdSeq  getChild3() {
		return exp3;
	}


    public Object visit(Visitor v, Object info) throws Exception {
	return v.visitIf(this, info);
    }
}
